package common.mq.persistence.service;

import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;

import org.springframework.jdbc.core.JdbcTemplate;

import common.mq.persistence.po.DBResult;

public interface IPersistenceService<T,V> {
	
	public void setJdbcTemplate(JdbcTemplate jdbcTemplate);
	
	public boolean save(Map<String, Map<T,V>> map);
	
	public boolean save(Map<String, Map<T,V>> map,boolean isAppend);
	
	public Map<T,V> recover(String key, Class<T> keyClass, Class<V> valueClass);
	
	public Map<T, Object> recover(String key, Class<T> keyClass, Type valueType);
	
	public List<DBResult> getDBResultList(String key);
	
	
	public void excuteSql(List<String> sqls);
	
	public void createTable(String tableName);
	
	public void createTable(List<String> tableNames);
	
}
